package ee.reliability.tool.parser;

import java.util.Calendar;
import java.util.Date;

import com.jidesoft.range.TimeRange;


public class Period extends TimeRange {
	private double realHours;
	private PeriodType periodType;

	public double getRealHours() {
		return realHours;
	}

	public void setRealHours(double realHours) {
		this.realHours = realHours;
	}

	public void addHours(double hours) {
		realHours += hours;
	}

	public PeriodType getPeriodType() {
		return periodType;
	}

	public void setPeriodType(PeriodType periodType) {
		this.periodType = periodType;
	}

	public Date getMinDate() {
		return _min;
	}

	public Date getMaxDate() {
		return _max;
	}

	public Calendar getMin() {
		Calendar c = Calendar.getInstance();
		c.clear();
		c.setTime(_min);
		return c;
	}

	public Calendar getMax() {
		Calendar c = Calendar.getInstance();
		c.clear();
		c.setTime(_max);
		return c;
	}

	public enum PeriodType{
		WORKING,SICK;
	}
}
